/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.guet.careapp.pojo;
import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author LXM
 */
@Entity
@Table(name = "t_user_info")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TUserInfo.findAll", query = "SELECT t FROM TUserInfo t"),
    @NamedQuery(name = "TUserInfo.findByUId", query = "SELECT t FROM TUserInfo t WHERE t.uId = :uId"),
    @NamedQuery(name = "TUserInfo.findByName", query = "SELECT t FROM TUserInfo t WHERE t.name = :name"),
    @NamedQuery(name = "TUserInfo.findByPassward", query = "SELECT t FROM TUserInfo t WHERE t.passward = :passward"),
    @NamedQuery(name = "TUserInfo.findByImage", query = "SELECT t FROM TUserInfo t WHERE t.image = :image"),
    @NamedQuery(name = "TUserInfo.findByRegisTime", query = "SELECT t FROM TUserInfo t WHERE t.regisTime = :regisTime"),
    @NamedQuery(name = "TUserInfo.findByTelphone", query = "SELECT t FROM TUserInfo t WHERE t.telphone = :telphone"),
    @NamedQuery(name = "TUserInfo.findByRemark", query = "SELECT t FROM TUserInfo t WHERE t.remark = :remark"),
    @NamedQuery(name = "TUserInfo.findByType", query = "SELECT t FROM TUserInfo t WHERE t.type = :type"),
    @NamedQuery(name = "TUserInfo.findByPhoneModel", query = "SELECT t FROM TUserInfo t WHERE t.phoneModel = :phoneModel"),
    @NamedQuery(name = "TUserInfo.findByDeviceId", query = "SELECT t FROM TUserInfo t WHERE t.deviceId = :deviceId")})
public class TUserInfo implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "u_id")
    private Integer uId;
    @Size(max = 30)
    @Column(name = "name")
    private String name;
    @Size(max = 255)
    @Column(name = "passward")
    private String passward;
    @Size(max = 255)
    @Column(name = "image")
    private String image;
    @Column(name = "regis_time")
    private BigInteger regisTime;
    @Size(max = 20)
    @Column(name = "telphone")
    private String telphone;
    @Size(max = 255)
    @Column(name = "remark")
    private String remark;
    @Size(max = 255)
    @Column(name = "type")
    private String type;
    @Size(max = 255)
    @Column(name = "phone_model")
    private String phoneModel;
    @Size(max = 255)
    @Column(name = "device_id")
    private String deviceId;

    public TUserInfo() {
    }

    public TUserInfo(Integer uId) {
        this.uId = uId;
    }

    public Integer getUId() {
        return uId;
    }

    public void setUId(Integer uId) {
        this.uId = uId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassward() {
        return passward;
    }

    public void setPassward(String passward) {
        this.passward = passward;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public BigInteger getRegisTime() {
        return regisTime;
    }

    public void setRegisTime(BigInteger regisTime) {
        this.regisTime = regisTime;
    }

    public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPhoneModel() {
        return phoneModel;
    }

    public void setPhoneModel(String phoneModel) {
        this.phoneModel = phoneModel;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (uId != null ? uId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TUserInfo)) {
            return false;
        }
        TUserInfo other = (TUserInfo) object;
        if ((this.uId == null && other.uId != null) || (this.uId != null && !this.uId.equals(other.uId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pojo.TUserInfo[ uId=" + uId + " ]";
    }

}
